#pragma once

#include "DataLayer.h"

/*
  Copyright 2008 by Alexey Solovyev and University of Pittsburgh
  Licensed under the Academic Free License version 3.0
  See the file "LICENSE" for more information
*/


namespace org
{
	namespace spark
	{
		namespace data
		{


			/// <summary>
			/// Extension of the standard data layer interface
			/// It specifies functions for working with all data stored in a data layer
			/// simultaneously.
			/// </summary>
			class AdvancedDataLayer : public DataLayer
			{
				/// <summary>
				/// Multiplies all data by the given value </summary>
				/// <param name="value"> a value </param>
			public:
				virtual void multiply(double value) = 0;

				/// <summary>
				/// Adds to data the given value </summary>
				/// <param name="value"> a value </param>
				virtual void add(double value) = 0;


				/// <summary>
				/// Returns a total number in the specific region </summary>
				/// <returns> a total number in the region </returns>
				virtual double getTotalNumber(double xMin, double xMax, double yMin, double yMax) = 0;


				/// <summary>
				/// Returns the total number filtered by the filter </summary>
				/// <param name="filter"> a filter represented by a data layer </param>
				/// <param name="val"> a threshold value for filtering </param>
				/// <returns> a total number </returns>
				virtual double getTotalNumber(DataLayer *filter, double val) = 0;


				/// <summary>
				/// Returns the maximum value in the data layer
				/// @return
				/// </summary>
				virtual double getMax() = 0;


				/// <summary>
				/// Return the minimum value in the data layer
				/// @return
				/// </summary>
				virtual double getMin() = 0;
			};
		}
	}
}
